3.4.91 \(\int \frac {\log (\frac {a+x^2}{x^2})}{x} \, dx\) [391]

Optimal. Leaf size=12 \[ \frac {1}{2} \text {Li}_2\left (-\frac {a}{x^2}\right ) \]

[Out]

1/2*polylog(2,-a/x^2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2511, 2438} \begin {gather*} \frac {1}{2} \text {PolyLog}\left (2,-\frac {a}{x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[(a + x^2)/x^2]/x,x]

[Out]

PolyLog[2, -(a/x^2)]/2

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2511

Int[((a_.) + Log[(c_.)*(v_)^(p_.)]*(b_.))^(q_.)*((f_.)*(x_))^(m_.), x_Symbol] :> Int[(f*x)^m*(a + b*Log[c*Expa
ndToSum[v, x]^p])^q, x] /; FreeQ[{a, b, c, f, m, p, q}, x] && BinomialQ[v, x] &&  !BinomialMatchQ[v, x]

Rubi steps

\begin {align*} \int \frac {\log \left (\frac {a+x^2}{x^2}\right )}{x} \, dx &=\int \frac {\log \left (1+\frac {a}{x^2}\right )}{x} \, dx\\ &=\frac {1}{2} \text {Li}_2\left (-\frac {a}{x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 12, normalized size = 1.00 \begin {gather*} \frac {1}{2} \text {Li}_2\left (-\frac {a}{x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[(a + x^2)/x^2]/x,x]

[Out]

PolyLog[2, -(a/x^2)]/2

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(85\) vs. \(2(10)=20\).
time = 0.09, size = 86, normalized size = 7.17

method result size
risch \(-\ln \left (\frac {1}{x}\right ) \ln \left (1+\frac {a}{x^{2}}\right )+\ln \left (\frac {1}{x}\right ) \ln \left (1+\frac {\sqrt {-a}}{x}\right )+\ln \left (\frac {1}{x}\right ) \ln \left (1-\frac {\sqrt {-a}}{x}\right )+\dilog \left (1+\frac {\sqrt {-a}}{x}\right )+\dilog \left (1-\frac {\sqrt {-a}}{x}\right )\) \(76\)
derivativedivides \(-\ln \left (\frac {1}{x}\right ) \ln \left (1+\frac {a}{x^{2}}\right )+2 a \left (\frac {\ln \left (\frac {1}{x}\right ) \left (\ln \left (1+\frac {\sqrt {-a}}{x}\right )+\ln \left (1-\frac {\sqrt {-a}}{x}\right )\right )}{2 a}+\frac {\dilog \left (1+\frac {\sqrt {-a}}{x}\right )+\dilog \left (1-\frac {\sqrt {-a}}{x}\right )}{2 a}\right )\) \(86\)
default \(-\ln \left (\frac {1}{x}\right ) \ln \left (1+\frac {a}{x^{2}}\right )+2 a \left (\frac {\ln \left (\frac {1}{x}\right ) \left (\ln \left (1+\frac {\sqrt {-a}}{x}\right )+\ln \left (1-\frac {\sqrt {-a}}{x}\right )\right )}{2 a}+\frac {\dilog \left (1+\frac {\sqrt {-a}}{x}\right )+\dilog \left (1-\frac {\sqrt {-a}}{x}\right )}{2 a}\right )\) \(86\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln((x^2+a)/x^2)/x,x,method=_RETURNVERBOSE)

[Out]

-ln(1/x)*ln(1+a/x^2)+2*a*(1/2*ln(1/x)*(ln(1+1/x*(-a)^(1/2))+ln(1-1/x*(-a)^(1/2)))/a+1/2*(dilog(1+1/x*(-a)^(1/2
))+dilog(1-1/x*(-a)^(1/2)))/a)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 69 vs. \(2 (9) = 18\).
time = 0.37, size = 69, normalized size = 5.75 \begin {gather*} -{\left (\log \left (x^{2} + a\right ) - 2 \, \log \left (x\right )\right )} \log \left (x\right ) + \log \left (x^{2} + a\right ) \log \left (x\right ) - \log \left (x\right )^{2} - \log \left (x\right ) \log \left (\frac {x^{2}}{a} + 1\right ) + \log \left (x\right ) \log \left (\frac {x^{2} + a}{x^{2}}\right ) - \frac {1}{2} \, {\rm Li}_2\left (-\frac {x^{2}}{a}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((x^2+a)/x^2)/x,x, algorithm="maxima")

[Out]

-(log(x^2 + a) - 2*log(x))*log(x) + log(x^2 + a)*log(x) - log(x)^2 - log(x)*log(x^2/a + 1) + log(x)*log((x^2 +
 a)/x^2) - 1/2*dilog(-x^2/a)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 15, normalized size = 1.25 \begin {gather*} \frac {1}{2} \, {\rm Li}_2\left (-\frac {x^{2} + a}{x^{2}} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((x^2+a)/x^2)/x,x, algorithm="fricas")

[Out]

1/2*dilog(-(x^2 + a)/x^2 + 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (\frac {a}{x^{2}} + 1 \right )}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln((x**2+a)/x**2)/x,x)

[Out]

Integral(log(a/x**2 + 1)/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((x^2+a)/x^2)/x,x, algorithm="giac")

[Out]

integrate(log((x^2 + a)/x^2)/x, x)

________________________________________________________________________________________

Mupad [B]
time = 0.29, size = 10, normalized size = 0.83 \begin {gather*} \frac {\mathrm {polylog}\left (2,-\frac {a}{x^2}\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log((a + x^2)/x^2)/x,x)

[Out]

polylog(2, -a/x^2)/2

________________________________________________________________________________________